﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta name="viewport" content="width=device-width" />
        <title></title>
        <style type="text/css">
            html, body {
                height: 100%;
                overflow: auto;
                left: 0;
                width: 100%;
                top: 0;
                height: 100%;
        margin: 0 auto;
        padding: 0 auto;
            }


            #oneAppControlHost {
                height: 100%;
                text-align: center;
                left: 0;
                width: 100%;
                top: 0;
                height: 100%;
                  margin: 0 auto;
        padding: 0 auto;
            }
        </style>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/2.3.0/jszip.js"></script>
        <script type="text/javascript" src="OneApp.js" async="async"></script>
        <script type="text/javascript">
            function onSilverlightError(sender, args) {
                throw new Error(errMsg);
            }
        </script>
    </head>
<body>
    <form id="form1" runat="server" style="height:100%;margin:0px;padding: 0px;">
        <div id="oneAppControlHost">
            @functions{
                public string GetPackageUri()
                {
                    const string package = "ClientBin/package.zip";
                    var lastwrite = System.IO.File.GetLastWriteTime(Server.MapPath(package));
                    return string.Format("{0}?version={1}", package, lastwrite.Ticks);
                }
            }
            <iframe width="100%" height="100%" style="border: 0px"
                    source="@GetPackageUri()"
                    src="splash.html"
                    onerror=" onsilverlighterror"
                    background="red"></iframe>
        </div>
    </form>
</body>
</html>
